package Demo_zhuanshu.XueQiang04;

import java.util.ArrayList;
//主方法
public class MainRedPacket {
    public static void main(String[] args){
        Manager manager=new Manager("群主",100);
        Member one=new Member("成员A",0);
        Member two=new Member("成员B",0);
        Member three=new Member("成员C",0);
        manager.show();
        one.show();
        two.show();
        three.show();
        System.out.println("*******************************************");
        //群主发20元，共发3个
        ArrayList<Integer> redList=manager.send(20,3);
        //三个普通成员收红包
        one.receiver(redList);
        two.receiver(redList);
        three.receiver(redList);

        manager.show();//100-20=80;
        //6,6,随机分配给3个人
        one.show();
        two.show();
        three.show();
    }
}


